import request from '@/utils/request'
// 获取员工列表信息
// dta:{page,size}
export const getEmployees = function(data) {
  return request.get('/sys/user', { params: data })
}
// 删除员工信息
/**
 * @description: 删除员工
 * @param {*} id 员工id
 * @return {*}
 */
export function delEmployee(id) {
  return request({
    method: 'delete',
    url: `/sys/user/${id}`
  })
}
// 新增员工
export const addEmployee = function(data) {
  return request.post('/sys/user', data)
}
// 导入ex
/**
 * @description: 导入excel
 * @param {*} data
 * @return {*}
 */
export function importEmployee(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
export function getEmployeesDetail(id) {
  return request.get('/sys/user/' + id)
}
// 更新用户
export const updateEmployee = function(data) {
  return request.put('/sys/user/' + data.id, data)
}
